name: build

on:
  push:
    branches: [ master ]
    tags:
      - "v*.*.*"
  workflow_dispatch:
  pull_request:
    types: [opened, edited, synchronize]
    branches: [ master ]

jobs:
  build:
    uses: ./.github/workflows/build.yaml

  test:
    needs: build
    uses: ./.github/workflows/test.yaml

  pack:
    needs: build
    uses: ./.github/workflows/package.yaml

  release:
    needs: [pack,test]
    if: startsWith(github.ref, 'refs/tags/v')
    uses: ./.github/workflows/release.yaml

